// The complied handlebars templates
// =================================
'use strict';

define([
  'handlebars',
  'text!template/article/menus.hbs',
  'text!template/article/article.hbs',
  'text!template/news/newsactivity.hbs',
  'text!template/news/news.hbs',
  'text!template/activity/activity.hbs',
  'text!template/index/index.hbs',
  'text!template/index/shoplist.hbs',

  
], function(Handlebars, menus, article, newsactivity, news, activity, index, shoplist) {
  
  Handlebars.registerHelper('currency', function(value, fractionDigits) {
    fractionDigits = fractionDigits || 0
    return (value / 100).toFixed(fractionDigits)
  })
  
  Handlebars.registerHelper('equal', function(value, confirm, options){
    if(value == confirm) {
      return options.fn(this);
    } else {
      return options.inverse(this);
    }
  })
  
  return {
    menuTpl        :   Handlebars.compile(menus),
    articleTpl     :   Handlebars.compile(article),
    NewsActivityTpl:   Handlebars.compile(newsactivity),
    NewsArticleTpl :   Handlebars.compile(news),
    ActivityartTpl :   Handlebars.compile(activity),
    indexTpl       :   Handlebars.compile(index),
    shopTpl        :   Handlebars.compile(shoplist)

  }
})